package day02;

import callback.ResultSetExtractor;

import java.sql.ResultSet;

public class UserNameResultSetExtractor implements ResultSetExtractor<String> {
    @Override
    public String extractData(ResultSet rs) throws Exception {
        if(rs.next()){
            System.out.println(rs.getInt("id")+"\t"+rs.getString("name"));
            return rs.getString("name");
        }
        return null;
    }
}
